package com.jkc.xh.models;

import android.text.TextUtils;

import java.io.Serializable;

/**
 * Created by zhangbreeze on 15/11/17.
 */
public class BalModel implements Serializable{
    public String id;
    public Long buss_time;
    public Long close_time;
    public String stock_code;
    public String stock_name;
    public String sum_buy_amount;
    public String avg_buy_price;
    public String buy_value;
    public String fee;
    public String bean;
    public String deposit;
    public String sell_amount;
    public String sell_price;
    public String sell_value;
    public String all_income;
    public String all_realin;

    /**
     * 是否盈利
     *
     * @return
     */
    public boolean isProfit() {
        boolean result = false;
        if (!TextUtils.isEmpty(all_realin) && !all_realin.startsWith("-")) {
            result = true;
        }
        return result;
    }

    /*
           {
                "id" : "序号",
                "buss_time" : "买入时间",
                "close_time" : "卖出时间",
                "stock_code" : "证券代码",
                "stock_name" : "证券名称",
                "sum_buy_amount" : "买入数量",
                "avg_buy_price" : "买入价格",
                "buy_value" : "买入市值",
                "fee" : "缴纳手续费",
                "bean" : "抵用券抵扣",
                "deposit" : "缴纳保证金",
                "sell_amount" : "卖出数量",
                "sell_price" : "卖出价格",
                "sell_value" : "卖出市值",
                "all_income" : "股票总净盈亏",
                "all_realin" : "用户总净盈亏",
            }
    *
    * */
}
